import { get } from "@/utils";

export interface GetRolesList {
  data: GetRolesItem[];
  meta: GetRolesMeta;
}

interface GetRolesMeta {
  msg: string;
  status: number;
}
export interface GetRolesItem {
  children: GetRolesChildren[];
  id: number;
  roleDesc: string;
  roleName: string;
}
interface GetRolesChildren {
  authName: string;
  children: GetRolesChildren[];
  id: number;
  path: string;
  roleName: string;
  roleDesc: string;
  roleId: number;
}
const getRoles = (): Promise<GetRolesList> => {
  return get("/roles");
};
export default getRoles;
